Advanced database features

One-to-many links

This tutorial demonstrates how to set up an A to B, A to C report using the Customer, Credit, and Orders tables in the Xtreme.mdb sample database. The Xtreme.mdb database is located in the \Program Files\Seagate Software\Crystal Reports\Samples\Databases directory. Use the instructions here as a guideline for creating A to B, A to C reports with your own database files.

To set up an A to B, A to C link
  1. On the Standard toolbar, click New.
  2. Click As a Blank Report and then OK on the Seagate Crystal Report Gallery.
  3. Expand the File Data Sources tree.
  4. Double-click the Xtreme.mdb database file to see its tables.
  5. Highlight the Credit table and click Add.
  6. Repeat the previous step for both the Customer and Orders tables.
  7. When all three tables have been added, click Close on the Data Explorer dialog box.

    The Visual Linking Expert appears.

  8. Link the Customer Credit ID field in the Credit table to the Customer ID field in each of the other two tables.

    Note:    A different linking configuration occurs if you click Smart Link and this tutorial will not work properly.

  9. Select one of the link lines in the Visual Linking Expert, and click Options.
  10. Click Look up all of one, then all of others in the When linking to two files from this file section of the Link Options dialog box.

    This option establishes an A to B, A to C link.

  11. Click OK to return to the Visual Linking Expert.

    The option you selected affected all links.

  12. To make sure the correct link option is in effect, click the link line that you did not select in the last step.
  13. Click Options, and verify the Look up all of one, then all of others setting in the Link Options dialog box.
  14. Click OK in the Link Options dialog box, then click OK again back in the Visual Linking Expert.

    For more information about this type of linking, see Look up all of one, then all of others (A to B, A to C).

You have now established an A to B, A to C relationship among the three tables.



Seagate Software, Inc.
http://www.seagatesoftware.com
Please send comments to:
techpubs@seagatesoftware.com